
<html>
	<head>
		<title>operator</title>
	</head>
	<style>
		.change-before {
			color : red;0
			font-size: 10em;
		}
		.change-after {
			color : green;
			font-size: 10em;
		}
		a{
			text-decoration:none;
		} 
	</style>
	<script>
		var flag = 0;
		function change() {
			var obj = document.getElementById("cs");
			if (flag == 0) {
				obj.className = "change-after";
				obj.innerHTML = "我是绿色的";
			} else {
				obj.className = "change-before";
				obj.innerHTML = "我是红色的";
			}
			flag ^= 1;
		}
	</script>
	<body>
		<a href="#">
			<div id="cs" class="change-before" onclick="change()">
				我是红色的
			</div>
		</a>
	</body>
</html>